﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0033)http://caipiao.jd.com/caipiao.htm -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=GBK">

<title>X? s? - Jingdong Mall</title>
<script>
    document.domain = "360buy.com";
</script>
<style type="text/css">
    html,body,div,span,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,address,big,cite,code,del,em,font,img,ins,small,strong,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend{margin:0;padding:0;}ol,ul{list-style:none;}:focus{outline:0;}a img{border:0;}img{vertical-align:middle;}table{empty-cells:show;}ins{text-decoration:none;}del{text-decoration:line-through;}em{font-style:normal;}
    button::-moz-focus-inner,
    input[type="reset"]::-moz-focus-inner,
    input[type="button"]::-moz-focus-inner,
    input[type="submit"]::-moz-focus-inner,
    input[type="file"]>input[type="button"]::-moz-focus-inner{border:none;padding:0;}
    .fl{float:left;}.fr{float:right;}.fn{float:none;}.al{text-align:left;}.ac{text-align:center;}.ar{text-align:right;}
    .clr{display:block;overflow:hidden;clear:both;height:0;line-height:0;font-size:0;}.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.clearfix{display:inline-table;}/* Hides from IE-mac \*/*html .clearfix{height:1%;}.clearfix{display:block;}/* End hide from IE-mac */*+html .clearfix{min-height:1%;}.overflow{overflow:hidden;}
    .form label,.form input,.form select,.form textarea,.form button,.form .label{float:left;font-size:12px;}
    .block{display:block;overflow:hidden;cursor:pointer;}
    .hide{display:none;}
    .invisible{visibility:hidden;}
    .tab{overflow:hidden;zoom:1;}
    .tab li,.tab a,.tab-item{float:left;cursor:pointer;text-align:center;}
    .btn-img,.button{display:inline-block;margin:0;padding:0;border:0;text-align:center;cursor:pointer;}
    .btn-text{margin:0;padding:0;text-align:center;cursor:pointer;}
    body{font:12px/150% Arial,Verdana,"\5b8b\4f53";color:#333;background:#fff;_background-image:url(about:blank);_background-attachment:fixed;}
    h1{font:20px "microsoft yahei","\5b8b\4f53";}
    h2,h3{font-size:14px;}
    h4,h5,h6{font-size:12px;}
    a:link,a:visited{color:#333;text-decoration:none;}
    a:hover{color:#C00;text-decoration:underline;}
    a:active{color:#900;}
        /*virtuals-iframe*/
    #caipiao{position:relative;width:200px;height:95px;padding:44px 0 0 8px;}
    #caipiao a{color:#005EA7;}
    #caipiao .goodluck{position:absolute;top:14px;left:8px;}
    #caipiao .goodluck select{height:22px;padding:2px;margin-right:4px;}
    #caipiao .goodluck strong{line-height:22px;margin-right:4px;}
    #caipiao b{display:none;}
    #caipiao .numbers span{display:inline-block;margin-right:8px;font-weight:bold;}
    #caipiao .red{color:red;}
    #caipiao .blue{color:blue;}
    #caipiao .links{padding:6px 0 12px;}
    #caipiao .links a{display:inline-block;margin-right:8px;}
    #caipiao .btns .label{display:none;line-height:25px;}
    #caipiao .button{float:left;width:73px;height:25px;line-height:25px;background:url(http://misc.360buyimg.com/lib/skin/2012/i/20111221B.png) no-repeat -124px -220px;margin-right:5px;}
        /*jz*/
    .teams{overflow:hidden;width:140px;height:46px;padding:2px 20px;margin-bottom:8px;background:#F5F5F5;zoom:1;}
    .team,.vs{float:left;text-align:center;}
    .team s{display:block;width:45px;height:30px;background-image:url(http://img10.360buyimg.com/da/g2/M05/06/15/rBEGElAZ3iEIAAAAAAAcFXOZjW0AABTTAGEVi0AABwt207.png);background-repeat:no-repeat;}
    .vs{padding:0 8px;line-height:34px;font-size:22px;color:#F60;font-family:Verdana;}
    #bx s{background-position:0 0;}
    #xby s{background-position:-50px 0;}
    #wlg s{background-position:-100px 0;}
    #yg s{background-position:-150px 0;}
    #mxg s{background-position:-200px 0;}
    #rs s{background-position:0 -35px;}
    #rb s{background-position:-50px -35px;}
    #hg s{background-position:-100px -35px;}
    #aj s{background-position:-150px -35px;}
    #sjnr s{background-position:-200px -35px;}
    #mlg s{background-position:0 -70px;}
    #jp s{background-position:-50px -70px;}
    #bels s{background-position:-100px -70px;}
    #hdls s{background-position:-150px -70px;}
    #alq s{background-position:-200px -70px;}
    #xxl s{background-position:0 -105px;}
        /*root61*/
    .root61 #caipiao{width:224px;padding-left:84px;}
    .root61 #caipiao .goodluck{left:84px;width:224px;}
    .root61 #caipiao .btns{width:224px;}
    .root61 #caipiao .btns .label{display:block;}
    .root61 #caipiao b{display:block;position:absolute;top:20px;left:6px;width:70px;height:70px;background-image:url(http://misc.360buyimg.com/product/skin/2012/i/20111221D.png);background-repeat:no-repeat;line-height:200px;overflow:hidden;}
    .root61 #caipiao #ssq b{background-position:-146px 0;}
    .root61 #caipiao #dlt b{background-position:-73px 0;}
    .root61 #caipiao #fc3d b{background-position:0 0;}
    .root61 #caipiao #jz b{background:url(http://img10.360buyimg.com/da/g2/M05/06/15/rBEGElAZ3iEIAAAAAAAcFXOZjW0AABTTAGEVi0AABwt207.png) no-repeat -175px -130px;}
</style>

<link type="text/css" rel="stylesheet" href="chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/style.css"><script type="text/javascript" charset="utf-8" src="chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/page_context.js"></script></head>
<body class="root61" screen_capture_injected="true" cz-shortcut-listen="true">
<script>(function(b){if(b)document.getElementsByTagName("body")[0].className=""})(window.location.href.match(/\?990/))</script>
<div class="form" id="caipiao">
<form id="quick_home_form" method="post" action="">
    <input type="hidden" id="lotteryNumber" name="order.lotteryNumber">

	<div class="goodluck">
		<strong class="label">Lưu y mua </strong>
		<select id="lotteryTypeId" name="order.lotteryTypeId" onchange="changeLotteryType()">
			<option value="ssq" selected="selected">màu bóng</option>
			<option value="dlt">bài lô tô</option>
			<option value="fc3d">3D</option>
            <option value="jz">king-chan</option>
		</select>
        <strong class="label" id="lottery_info">Hãy th? v?n ??may của bạn !</strong>
	</div>
	<div id="ssq" class="">
		<b>màu bóng</b>
			<div class="numbers" id="ssq_ball">
                <span class="num red">06</span>
                <span class="num red">09</span>
                <span class="num red">12</span>
                <span class="num red">14</span>
                <span class="num red">19</span>
                <span class="num red">30</span>
                <span class="num blue">12</span>
			</div>
        <div class="links">
			<a href="javascript:" id="ssq_random_1">[Máy bầu Lưu y]</a>
			<a href="http://caipiao.360buy.com/lottery_ssq.html" target="_blank">[ch?n h? th?ng]</a>
        </div>
			<div class="btns">
                <input type="button" class="button" id="ssq_buy" title="G?i d? li?u" value="G?i d? li?u">
                <span class="label" id="promotwords-ssq"><a href="http://sale.360buy.com/act/z5xabSpNOdijnVw.html" 
				target="_blank">Khán giả của am thanh, sách và video 300-100</a></span>
			</div>
	</div>
    <div class="hide" id="dlt">
		<b>bài lô tô</b>
			<div class="numbers" id="dlt_ball">
                <span class="num red">05</span>
                <span class="num red">09</span>
                <span class="num red">13</span>
                <span class="num red">22</span>
                <span class="num red">24</span>
                <span class="num blue">06</span>
                <span class="num blue">10</span>
			</div>
        <div class="links">
			<a href="javascript:" id="dlt_random_1">[Máy bầu Lưu y]</a>
			<a href="http://caipiao.360buy.com/lottery_dlt.html" target="_blank">[chọn hệ thống]</a>
        </div>
			<div class="btns">
                <input type="button" class="button" id="dlt_buy" title="Gửi dữ liệu" value="Gửi dữ liệu">
                <span class="label" id="promotwords-dlt"><a href="http://sale.360buy.com/act/z5xabSpNOdijnVw.html" 
				target="_blank">Khán gi? c?a am thanh, sách và video300-100</a></span>
			</div>
	</div>
    <div class="hide" id="fc3d">
		<b>3D</b>
			<div class="numbers" id="fc3d_ball">
                <span class="num red">0</span>
                <span class="num red">3</span>
                <span class="num red">4</span>
			</div>
        <div class="links">
			<a href="javascript:" id="fc3d_random_1">[Máy bầu Lưu y]</a><a href="http://caipiao.360buy.com/lottery_fc3d.html" 
			target="_blank">[chọn hệ thống]</a>
        </div>
			<div class="btns">
                <input type="button" class="button" id="fc3d_buy" title="Gửi dữ liệu" value="Gửi dữ liệu">
                <span class="label" id="promotwords-fc3d"><a href="http://sale.360buy.com/act/z5xabSpNOdijnVw.html" 
				target="_blank">Khán giả của am thanh, sách và video300-100</a></span>
			</div>
	</div>
    <div class="hide" id="jz">
        <b>king-chan</b>
        <div class="teams" id="jz_team">
        </div>
        <div class="btns">
            <input type="button" class="button" id="buy_jz" 
			onclick="window.open(&#39;http://caipiao.360buy.com/lottery_spf.html?entry=1&#39;)" title="Gửi dữ liệu" 
			value="Gửi dữ liệu">
            <span class="label" id="promotwords-jz"><a href="http://sale.360buy.com/act/z5xabSpNOdijnVw.html" 
			target="_blank">Khán giả của am thanh, sách và video300-100</a></span>
        </div>
    </div>

</form>
</div>

<script type="text/javascript">
function showJZteam(){
	var h=document.getElementsByTagName("head")[0],
	s=document.createElement("script");
	s.type="text/javascript";
	s.src="http://fa.360buy.com/loadFa.js?aid=14_456_2594";
	h.appendChild(s);	
}
    var url = "";
    var xmlhttp = null;
    var indexData = null;

    function InitXMLHttpRequest() {
        xmlhttp = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHttp");
    }

    function LoadIndexJSON() {
        if (xmlhttp == null) {
            InitXMLHttpRequest();
        }
        if (xmlhttp == null) {
            get("lottery_info").innerHTML = "<label class='red'>Trình duyệt của bạn không hỗ trợ</label>";
            return false;
        }
        xmlhttp.open("GET", url + "/json/login/search_searchIndexData.html", false);
        xmlhttp.setRequestHeader("Content-Type", "text/plain");
        xmlhttp.onreadystatechange = GetIndexJSONMessage;
        xmlhttp.send(null);
        if (xmlhttp.status == 200 && navigator.userAgent.indexOf("Firefox") > 0) {
            xmlhttp.onreadystatechange = GetIndexJSONMessage();
        }
    }

    function GetIndexJSONMessage() {
        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
            var jsonText = xmlhttp.responseText;
            if (jsonText == null || jsonText == "" || jsonText == "null") {
                indexData = "-1";
                return;
            }
            indexData = eval('(' + jsonText + ')');
        }
    }

    function get(id){return document.getElementById(id)}

    function randomSelect(srcArr, selectQuantity) {
        var arr = srcArr.slice(0);
        var result = [];
        for (var i = 0; i < selectQuantity; i++) {
            var idx = Math.floor(Math.random() * arr.length);
            result[result.length] = arr[idx];
            arr.splice(idx, 1);
        }
        return result;
    }

    var ev = {
        addEvent: function(obj, evt, fun) {
            if (obj.addEventListener) {//for dom
                obj.addEventListener(evt, fun, false);
            }
            else if (obj.attachEvent) {//for ie
                obj.attachEvent("on" + evt, fun);
            }
            else {
                obj["on" + evt] = fun
            }//for other
        },

        getTarget: function(e) {
            return e.target || e.srcElement;
        }
    };

    var lotteryType = {
        ssq: {
            id: "ssq",
            redAll: ["01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33"], blueAll: ["01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16"],
            redNum: '6',
            blueNum: '1',
            sorted: true,
            zero: true,
            lotteryTypeId : 1,
            childPlayType : 0,
            redSeparatorBlue : "|",
            numberSeparatorNumber : " "
        },
        dlt: {
            id: "dlt",
            redAll: ["01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35"], blueAll: ["01","02","03","04","05","06","07","08","09","10","11","12"],
            redNum: '5',
            blueNum: '2',
            sorted: true,
            zero: true,
            lotteryTypeId : 4,
            childPlayType : 0,
            redSeparatorBlue : "|",
            numberSeparatorNumber : " "
        },
        fc3d: {
            id: "fc3d",
            redAll: ["0","1","2","3","4","5","6","7","8","9"],
            blueAll: [],
            redNum: '3',
            blueNum: '0',
            sorted: false,
            zero: false,
            numberSeparatorNumber : " ",
            lotteryTypeId : 2,
            childPlayType : 0
        },
        jz: {
            id:"jz"
        }
    };

    var RandomLottery = function(lotType) {
        var freshBtn = get(lotType.id + "_random_1"),
                ball = get(lotType.id + "_ball").getElementsByTagName("span"),
                running = 0;

        var ballRandom = function(el, v, step, zero) {
            var num = 0;
            var max = zero ? 35 : 9;
            running += 1;
            setTimeout(function() {
                num++;
                if (num > 25) {
                    running -= 1;
                    el.innerHTML = v;
                    return;
                } else {
                    var r = Math.ceil(Math.random() * max);
                    if (zero) {
                        el.innerHTML = Number(r) < 10 ? '0' + r.toString() : r;
                    } else {
                        el.innerHTML = r;
                    }
                    setTimeout(arguments.callee, step);
                }
            }, step);
        };

        var randomBall = function(id) {
            var betNumber = getLotteryBetNumber({
                lotteryTypeId : lotType.lotteryTypeId,
                childPlayType : lotType.childPlayType,
                stake : 1,
                redSeparatorBlue : lotType.redSeparatorBlue,
                numberSeparatorNumber : lotType.numberSeparatorNumber,
                redCount : lotType.redNum,
                blueCount : lotType.blueNum
            });
            if(betNumber.length != 1){
                var max;
                var _red = randomSelect(lotType.redAll, lotType.redNum);
                if (lotType.sorted) {
                    _red = _red.sort();
                }
                var _blue = randomSelect(lotType.blueAll, lotType.blueNum).sort();
                if (lotType.sorted) {
                    _blue = _blue.sort();
                }
                betNumber[0] = {reds : _red, blues : _blue};
            }
            var _a = betNumber[0].reds.concat(betNumber[0].blues);

            var k = 0;
            for (var i = 0; i < _a.length; i++) {
                ballRandom(ball[k], _a[i], 10, lotType.zero);
                k++;
            }
        };

        this.randomBall = randomBall;//Thi?t l?p giao di?n

        ev.addEvent(freshBtn, 'click', function(e) {
            randomBall(lotType.id);
        });

        //randomBall(lotType.id);

        var buyBtn = get(lotType.id + "_buy");
        ev.addEvent(buyBtn, 'click', function(e) {
            var lotName = ev.getTarget(e);
            if (running > 0) {
                get("lottery_info").innerHTML = "Chỉ cho các sự di chuyển";
                return;
            }
            var ballNums = [];
            for (var i = 0; i < ball.length; i++) {
                ballNums.push(ball[i].innerHTML);
            }

            var lotteryNumber,lotteryTypeId,issueId,issueName,canSell = false,time = 0;
            LoadIndexJSON();
            var idStr = lotName.id.split("_")[0];
            switch (idStr) {
                case lotteryType.ssq.id:
                    lotteryNumber = "0:" + ballNums.slice(0, 6).join(' ') + '|' + ballNums.slice(6).join(' ') + ":1";
                    lotteryTypeId = "1";
                    issueId = indexData.currentIssueId_1;
                    issueName = indexData.currentIssueName_1;
                    canSell = indexData.canSell_1;
                    time = indexData.remainTime_1;
                    break;
                case lotteryType.dlt.id:
                    lotteryNumber = "0:" + ballNums.slice(0, 5).join(' ') + '|' + ballNums.slice(5).join(' ') + ":1";
                    lotteryTypeId = "4";
                    issueId = indexData.currentIssueId_4;
                    issueName = indexData.currentIssueName_4;
                    canSell = indexData.canSell_4;
                    time = indexData.remainTime_4;
                    break;
                case lotteryType.fc3d.id:
                    lotteryNumber = "0:" + ballNums.join("|") + ":1";
                    lotteryTypeId = "2";
                    issueId = indexData.currentIssueId_2;
                    issueName = indexData.currentIssueName_2;
                    canSell = indexData.canSell_2;
                    time = indexData.remainTime_2;
                    break;
                default:
                    break;
            }
            if (!canSell) {
                get("lottery_info").innerHTML = "<label class='red'>Tạm thời bán < /label>";
                return false;
            }
            if (time < 1) {
                get("lottery_info").innerHTML = "<label class='red'>Chỉ một khoảng thời gian mã mới</label>";
                return false;
            }

            var submitUrl = url + "/order/order_pre.html?order.lotteryTypeId=" + lotteryTypeId
                    + "&order.issueId=" + issueId
                    + "&order.issueName=" + issueName
                    + "&order.lotteryNumber=" + lotteryNumber
                    + "&order.totalStake=1&order.multi=1&order.totalFee=2&entry=1";
            window.open(submitUrl);
            try{window.parent.pageTracker._trackEvent('Button', 'GamePrice', 'HomePage');}catch(err){}
        });
    };

    var changeLotteryType = function() {
        var showId = "ssq";
        var jz = "jz";

        var lotteryTypeId = get("lotteryTypeId");
        if (!lotteryTypeId) {
            return;
        }
        var changeHandler = function() {
            get("lottery_info").innerHTML = "Ch? ??i m?t kho?ng th?i gian m? m?i！";
            var v = lotteryTypeId.value,
                    rid = lotteryType[v].id;
            if (rid != showId) {
                get(showId).className = "hide";
                showId = rid;
                get(showId).className = "";
                if (rid != jz) {
                    lotteryType[v].obj.randomBall();
                }
            } else {
                get(showId).className = "";
                if (rid != jz) {
                    lotteryType[v].obj.randomBall();
                }
            }
            if(v==jz){
            	showJZteam();
            }
        };
        lotteryTypeId.onchange = changeHandler;

        for (var k in lotteryType) {
            var v = lotteryType[k];
            if (v.id != jz) {
                v.obj = new RandomLottery(v);
            }
        }
        changeHandler();
    };

    var getLotteryBetNumber = function(options){
        var lotteryXmlHttp = null;
        var betNumber = [];

        function getXmlHttp(){
            return window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
                    new window.XMLHttpRequest() : new window.ActiveXObject("Microsoft.XMLHTTP");
        }

        function lotteryAjax(){
            lotteryXmlHttp = getXmlHttp();
            if (lotteryXmlHttp) {
                lotteryXmlHttp.open("POST", url + "/order/order_getRandomNum.html", false);
                lotteryXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=GBK");
                var xmlHttpTimeout = setTimeout(function(){
                    lotteryXmlHttp.abort();
                }, 3000);
                lotteryXmlHttp.send("lotteryTypeId=" + options.lotteryTypeId +
                        "&childPlayType=" + options.childPlayType +
                        "&stake=" + options.stake);
                clearTimeout(xmlHttpTimeout);
                callblack();
            }else{
                return;
            }
        }

        function callblack(){
            if (lotteryXmlHttp.readyState == 4 && lotteryXmlHttp.status == 200) {
                var json = lotteryXmlHttp.responseText;
                if(json != null &&  json != "null" && json.length > 0){
                    var data = eval('(' + json + ')');
                    for(var i = 0; i < options.stake; i++){
                        //Red bóng và bóng r?
                        var number = data[i].split(options.redSeparatorBlue);
                        //M?t m?ng các qu? bóng màu ??
                        var _red = number[0].split(options.numberSeparatorNumber);
                        //Bóng r? m?ng, kh?ng có bóng r? cho các m?ng r?ng []
                        var _blue = number.length > 1 ? number[1].split(options.numberSeparatorNumber) : [];
                        if(_red.length == options.redCount &&
                                _blue.length == options.blueCount){
                            betNumber[i] = {reds : _red, blues : _blue};
                        }else{
                            betNumber = [];
                            break;
                        }
                    }
                }
            }
        }

        try{
            lotteryAjax();
        }catch(e){
            betNumber = [];
        }

        return betNumber;
    };

    changeLotteryType();
</script>
<script type="text/javascript" src="./caipiao_files/hotwords.aspx"></script>


<div id="shadowMeasureIt"></div><div id="divCoordMeasureIt"></div>
<div id="divRectangleMeasureIt"><div id="divRectangleBGMeasureIt"></div></div></body></html>